<!DOCTYPE HTML>
<html>
<head>
    <meta charset="UTF-8">
    <link href="https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.7.1/leaflet.css" rel="stylesheet">
    <script type="text/javascript" src="./textJS/leaflet/leaflet.js"></script>
    <script type="text/javascript" src="https://iclient.supermap.io/dist/leaflet/iclient-leaflet.js"></script>
	<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet.heat/0.2.0/leaflet-heat.js"></script>
</head>
<body>
    <!-- // 地图显示的div -->
    <div id="map" style="position:absolute;left:0px;right:0px;width:100vw;height:100vh"></div>
	<script>
		var url ="https://iserver.supermap.io/iserver/services/map-china400/rest/maps/China";
		// 初始化地图信息
		var map = L.map('map', {
		     center: [0, 0],
		           maxZoom: 18,
		           zoom: 1
		});
		new L.supermap.TiledMapLayer(url).addTo(map);
		//定义热力点数量，加热力半径
		var heatNumbers = 150, heatRadius = 30;
		//加热力坐标信息数组
		var heatPoints = [];
		//遍历添加坐标信息
		for (var i = 0; i < heatNumbers; i++) {
		heatPoints[i]=[ Math.random() * 0.28 + 39.78, Math.random() * 0.5 + 116.12, Math.random() * 80];
		}
		//调用渲染方法，传入半径，透明度参数，添加到地图
		var resultLayer = L.heatLayer(heatPoints, {
		        radius: heatRadius,
		        minOpacity: 0.5
		    }).addTo(map);
		console.log(L)
	</script>
</body>
</html>